﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TriggerForm.cs" company="Wut?">
//   Hmmm!
// </copyright>
// <summary>
//   Defines the TriggerForm type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Eeeek
{
    using System;
    using System.Windows.Forms;

    /// <summary>
    /// Prompts for the text to use as a trigger
    /// </summary>
    public partial class TriggerForm : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TriggerForm"/> class.
        /// </summary>
        public TriggerForm()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Gets the trigger text.
        /// </summary>
        public string TriggerText
        {
            get
            {
                return this.TriggerTextTextBox.Text;
            }
        }

        /// <summary>
        /// Handles the TextChanged event of the TriggerTextTextBox control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void TriggerTextTextBoxTextChanged(object sender, EventArgs e)
        {
            this.ButtonOk.Enabled = !string.IsNullOrWhiteSpace(this.TriggerTextTextBox.Text);
        }
    }
}
